package com.twb.system.entity.importExport.dto;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

import com.alibaba.fastjson.JSON;
import com.twb.core.util.BeanUtils;
import com.twb.system.entity.importExport.BaseImportExport;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

 /** 
 * @ClassName SearchImportExportDto 
 * @Description 异步导入导出记录表【/system/importExport/search 出参对象】
 
 * @author DHL
 * @date 2021-08-09 09:39:11
 */ 
@ApiModel(value="SearchImportExportDto",description="异步导入导出记录表【/system/importExport/search 出参对象】")
public class SearchImportExportDto extends BaseImportExport implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	/** 读取Excel条数 */
	@ApiModelProperty(value = "读取Excel条数")
	private String readNum;

	/** 成功条数 */
	@ApiModelProperty(value = "成功条数")
	private String successNum;

	/** 失败条数 */
	@ApiModelProperty(value = "失败条数")
	private String failureNum;

	public String getReadNum() {
		return readNum;
	}

	public void setReadNum(String readNum) {
		this.readNum = readNum;
	}

	public String getSuccessNum() {
		return successNum;
	}

	public void setSuccessNum(String successNum) {
		this.successNum = successNum;
	}

	public String getFailureNum() {
		return failureNum;
	}

	public void setFailureNum(String failureNum) {
		this.failureNum = failureNum;
	}
	
	
	/**
	 * 反序列化导入结果
	 */
	public String getResultInfo() {
		String resultInfo = super.getResultInfo();
		
		if(StringUtils.isNotBlank(resultInfo)) {
			SearchImportExportDto parseObject = JSON.parseObject(resultInfo, this.getClass());
			
			BeanUtils.copyNotNullProperties(parseObject, this);
		}
		
		return resultInfo;
	}
	
	/**
	 * @Title getImportPathUrl
	 * @Description 源文件下载路径
	 * @return
	 * @author DHL
	 * @date 2021年9月28日 上午10:50:57
	 */
	public String getImportPathUrl() {
		return null;
	}
}